cordova.define("com.jiusem.cordova.wechatshare.WechatShare", function(require, exports, module) { 	
	var wechatshare = {	 
		//分享	
		send: function(arg) {
			if (typeof arg.isSendToTimeline === 'undefined') {arg.isSendToTimeline = true}
			if (arg.type === 'image' && typeof arg.imageType === 'undefined') {arg.imageType = 'url'}
			if (arg.type === 'music' || arg.type === 'video' || arg.type === 'webpage') {
				if (typeof arg.title === 'undefined') {arg.title = ''}
				if (typeof arg.desc === 'undefined') {arg.desc = ''}
				if (typeof arg.imgUrl === 'undefined') {arg.imgUrl = ''}
				if (typeof arg.isLowBand === 'undefined') {arg.isLowBand = false}
			}
			cordova.exec(function(){},function(){}, "WechatShare", "send", [arg]);
		},
		//显示提示信息
		showToast:function(txt){
			cordova.exec(null,null,"WechatShare","showToast",[txt]);
			
		},
		//分享回调函数
		sendCallBack:function(result){
			switch(result){
				case 1:
				this.showToast('分享成功');
				break;

				case 2:
				this.showToast('取消分享');
				break;
				
				case 3:
				this.showToast('验证失败');
				break;
				
				case 4:
				this.showToast('未知错误');
				break;	
			}
		}
	}
	module.exports = wechatshare;
	



});
